package edu.kpi.pzks2.simulator.core;

import edu.kpi.pzks2.graph.Edge;
import edu.kpi.pzks2.graph.Node;
import edu.uci.ics.jung.graph.DirectedGraph;
import edu.uci.ics.jung.graph.Graph;

public class SimulationBundle {
    private DirectedGraph<Node, Edge> task;
    private Graph<Node, Edge> system;
    
    private int chanelsCount;
    private boolean duplex = true;
    private int linkSpeed;
    private int productivity;
    private boolean packageMode;
    private QueueBuilder queueBuilder;
    
    public static class SimulationBundleBuilder {
        private final SimulationBundle bundle;
        
        public SimulationBundleBuilder() {
            bundle = new SimulationBundle();
        }
        
        public void setTask(final DirectedGraph<Node, Edge> task) {
            bundle.task = task;
        }
        
        public void setSystem(final Graph<Node, Edge> system) {
            bundle.system = system;
        }
        
        public void setChanelCount(final int chanelCount) {
            bundle.chanelsCount = chanelCount;
        }
        
        public void setDuplex(final boolean duplex) {
            bundle.duplex = duplex;
        }
        
        public void setLinkSpeed(final int linkSpeed) {
            bundle.linkSpeed = linkSpeed;
        }
        
        public void setProductivity(final int productivity) {
            bundle.productivity = productivity;
        }
        
        public void setPackageMode(final boolean isPackageModeOn) {
            bundle.packageMode = isPackageModeOn;
        }
        
        public void setQueueBuilder(final QueueBuilder queueBuilder) {
            bundle.queueBuilder = queueBuilder;
        }
        
        public SimulationBundle buildBundle() {
            return bundle;
        }
    }

    public DirectedGraph<Node, Edge> getTask() {
        return task;
    }

    public Graph<Node, Edge> getSystem() {
        return system;
    }

    public int getChannelCount() {
        return chanelsCount;
    }

    public boolean isDuplex() {
        return duplex;
    }
    
    public int getLinkSpeed() {
        return linkSpeed;
    }
    
    public int getProductivity() {
        return productivity;
    }
    
    public boolean isPackageMode() {
        return packageMode;
    }
    
    public QueueBuilder getQueueBuilder() {
        return queueBuilder;
    }
}
